package com.gmail.rusal4ica.dots;

/**
 * @author The Imperial Sword Team
 */

public class Utility {
	
    /**
     * The method formats the time elapsed.
     * 
     * @param countUp - time elapsed in milliseconds
     * @return String representation of the time elapsed which is human readable
     */
	static String showTime(long countUp){
    	String asText;
    	if((countUp % 60) < 10){
			if((countUp / 60) < 10){
				asText = "0" + (countUp / 60) + ":0" + (countUp % 60); 
			} else {
				asText = (countUp / 60) + ":0" + (countUp % 60); 
			}
		} else {
			if ((countUp / 60) < 10){
				asText = "0" + (countUp / 60) + ":" + (countUp % 60);
			} else {
				asText = (countUp / 60) + ":" + (countUp % 60); 
			}
		}
    	return asText;
    }
}